/*
 * Copyright(C) 2010 Luvina Software Company
 *
 * Message.java, Oct 29, 2010 ntmhuong
 */
package net.luvina.manageuser.util;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * Message
 *
 * @author ntmhuong
 *
 */
public class Message {
    private static final String BUNDLE_NAME = "./message_error_ja_JP";

    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
            .getBundle(BUNDLE_NAME);

    /**
     * Contructor
     */
    private Message() {
    }

    /**
     * Get string from properties file.
     *
     * @param key
     *            String
     * @return string in properties file.
     */
    public static String getString(String key) {
        try {
            return RESOURCE_BUNDLE.getString(key);
        } catch (MissingResourceException e) {
            return '!' + key + '!';
        }
    }
}
